home *** CD-ROM | disk | FTP | other *** search
/ APDL Eductation Resources / APDL Eductation Resources.iso / programs / electronic / rlab / !RLaB / rlib / isreal < prev    next >
Encoding:
Text File  |  1995-02-24  |  478 b   |  20 lines

  1. //-------------------------------------------------------------------//
  2. // Synopsis:    Test if a matrix is ALL real.
  3.  
  4. // Usage:       isreal ( A )
  5.  
  6. // Description:
  7.  
  8. //      isreal tests its argument, A, and returns TRUE (1) if A's
  9. //      elements are all real, or FALSE (0) if any of A's elements are
  10. //      complex. 
  11.  
  12. // See Also: any
  13.  
  14. //-------------------------------------------------------------------//
  15.  
  16. isreal = function ( A )
  17. {
  18.   return all (all (imag (A) == 0));
  19. };
  20.